//
//  NSIndexSet+WCExtensions.m
//  WabbitCode
//
//  Created by William Towe on 2/3/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import "NSIndexSet+WCExtensions.h"


@implementation NSIndexSet (WCExtensions)
- (NSArray *)arrayWithIndexesFromIndexSet; {
	NSUInteger index, count = [self count];
	NSUInteger indexes[count];
	NSMutableArray *indexObjects = [NSMutableArray array];
	
	[self getIndexes:indexes maxCount:count inIndexRange:NULL];
	
	for (index = 0; index < count; index++)
		[indexObjects addObject:[NSNumber numberWithInteger:indexes[index]]];
		
	return [[indexObjects copy] autorelease];
}
@end
